package model.service;


import model.Machine;
import model.ProductionOrder;

public abstract class ServiceBehaviour 
{
	//translate response to a machine
	public abstract Machine translateResponseToMachine(String response) throws Exception;
		
	protected Machine createMachine(String id, String name, ProductionOrder order, String description, double currentSpeed, String status)
	{
		return new Machine(id, name, order, description, currentSpeed, status);
	}
	
	protected ProductionOrder createOrder(String dbid, String id, long duration, String startDateTime, String endDateTime, 
			String requestedStartDateTime, String requestedEndDateTime, String requestedProduct, String requestedProductDescription, 
			String actualProduct, String actualProductDescription, int requestedCount, int actualCount)
	{
		return new ProductionOrder(dbid, id, duration, startDateTime, endDateTime, requestedStartDateTime, 
				requestedEndDateTime, requestedProduct, requestedProductDescription, actualProduct, 
				actualProductDescription, requestedCount, actualCount);
	}
	
	
}
